<%@ page language="java" contentType="text/html; charset=GB2312" import="java.util.*,course.*"%>
<%@ include file="SessionCheck.jsp"%>
<%
response.setCharacterEncoding("GB2312");
Student std=(Student)session.getAttribute("student");
String sid=std.getId();
String cid=request.getParameter("courseId");
MyCourse myCourse=new MyCourse();
boolean status=myCourse.add(sid,cid);
if(status)
{
   response.sendRedirect("findCourse.jsp?status=success");
}
else
   response.sendRedirect("findCourse.jsp?status=fail");
%>
